// 这里面不要动  在自己的路由下面写
import { lazy } from "react"
import { Navigate } from "react-router-dom"

import zyh from "./childRouter/zyh"
import wmh from "./childRouter/wmh"
import ybk from "./childRouter/ybk"
import ycf from "./childRouter/ycf"
import yjr from "./childRouter/yjr"
import yzh from "./childRouter/yzh"

// tabBar的路由，表面路由写上
const Layouts = lazy(() => import("../layouts/layouts"))
const BrushingVideos = lazy(() => import("../yzh/view/brushingVideos")) // 视频
const Discover = lazy(() => import("../ycf/discover")) // 视频
const Information = lazy(() => import("../wmh/information")) // 视频
const User = lazy(() => import("../yjr/user")) // 视频
const Publish = lazy(() => import("../yjr/publish")) // 视频
// const Mine = lazy(() => import("../zyh/mine")) // 消息

const routes = [
    // 这是tabBar的父组件，不要动
    {
        path: "/layouts", element: <Layouts />, children: [
            { path: "/layouts/brushingVideos", element: <BrushingVideos /> },
            { path: "/layouts/discover", element: <Discover /> },
            { path: "/layouts/information", element: <Information /> },
            { path: "/layouts/user", element: <User /> },
        ]
    },
    { path: "/publish", element: <Publish /> },
    { path: "/", element: <Navigate to="/layouts/brushingVideos" /> },

    ...yjr,
    ...zyh,
    ...wmh,
    ...ybk,
    ...ycf,
    ...yzh,
]

export default routes